home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
LIBRARY
/
PASCALL
/
TEMPJUNK
/
CIRCK.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-01-26
|
1KB
|
71 lines
program circk;
uses
crt,graph;
const
skip=1;
tunnelwidth=100;
tunnelspan=100;
type
fpointtype=file of pointtype;
procedure setupgraph(Gd,Gm:integer);
begin
InitGraph(Gd,Gm,'c:\tp\bgi');
if GraphResult<>grOk then halt;
cleardevice;
end;
procedure tunnel(var batchfile:fpointtype);
var
a:integer;
temp:pointtype;
begin
setcolor(white);
for a:=0 to 359 do
begin
seek(batchfile,a);
read(batchfile,temp);
with temp do
circle(x,y,tunnelwidth);
end;
end;
procedure circdef(var batchfile:fpointtype);
var
a:integer;
temp:pointtype;
arccoords:arccoordstype;
begin
setcolor(black);
for a:=0 to 359 do
begin
arc(getmaxx div 2,getmaxy div 2,a,a+1,tunnelspan);
getarccoords(arccoords);
temp.x:=arccoords.xstart;
temp.y:=arccoords.ystart;
seek(batchfile,a);
write(batchfile,temp);
a:=a+skip-1;
end;
cleardevice;
end;
procedure control;
var
batchfile:fpointtype;
begin
assign(batchfile,'tempfile.dat');
{ rewrite(batchfile);}
reset(batchfile);
{ circdef(batchfile);}
tunnel(batchfile);
close(batchfile);
{ erase(batchfile);}
end;
begin
setupgraph(vga,vgahi);
control;
end.